var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o]);
    })(e, t);
}, function(e, t) {
    function n() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, 
    new n());
}), a = this && this.__decorate || function(e, t, o, n) {
    var a, r = arguments.length, l = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, o) : n;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) l = Reflect.decorate(e, t, o, n); else for (var c = e.length - 1; 0 <= c; c--) (a = e[c]) && (l = (r < 3 ? a(l) : 3 < r ? a(t, o, l) : a(t, o)) || l);
    return 3 < r && l && Object.defineProperty(t, o, l), l;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("PrefabView"), s = e("AudioManager"), c = e("Global"), l = e("GameConfig"), d = e("ActivityManager"), u = e("UIManager"), p = e("WebManager"), h = cc._decorator, f = h.ccclass, g = h.property, m = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.scaleLabel = null, e.timeLabel = null, e.countLabel = null, e;
    }
    return i(e, t), e.prototype.onLoad = function() {
        this.scaleLabel.string = l.GC.diamondScale.toString(), this.countLabel.string = l.GC.maxDiamondCount.toString();
        var e = d.ActivityManager.getInstance().activityConfigMap.get(d.ActivityType.DIAMOND), t = new RegExp(new Date().getFullYear() + "-", "g"), o = new RegExp(new Date().getFullYear() + 1 + "-", "g");
        this.timeLabel.string = e.time.replace(t, "").replace(o, "");
    }, e.prototype.onDestroy = function() {
        var e;
        t.prototype.onDestroy.call(this), 0 < c.G.queue.length && (1 == (e = c.G.queue.shift()).type ? u.default.getInstance().loadPnl(e.name) : 2 == e.type && u.default.getInstance().loadPopPnl(e.name, e.data));
    }, e.prototype.onClickDiamond = function() {
        s.default.getInstance().playAudio("按钮2"), p.default.getInstance().sentLog("点击钻石栏按键"), 
        c.G.platform != c.Platform.XiaoDu ? u.default.getInstance().loadPopPnl("diamond", {
            num: 100,
            view: this
        }) : u.default.getInstance().showToast({
            str: "今日获取钻石次数已达上限"
        }), this.hidePnl();
    }, e.prototype.start = function() {
        cc.tween(this.node).to(.1, {
            scale: 1.1
        }).to(.1, {
            scale: 1
        }).start();
    }, a([ g(cc.Label) ], e.prototype, "scaleLabel", void 0), a([ g(cc.Label) ], e.prototype, "timeLabel", void 0), 
    a([ g(cc.Label) ], e.prototype, "countLabel", void 0), a([ f ], e);
}(r.default);

n.default = m;